using CHEnhanceEfCore.Common.Page;
using Microsoft.AspNetCore.Mvc.Filters;

namespace CHEnhanceEfCore.Interceptor
{
    /// <summary>
    /// 拦截处理器 当请求即将到达控制器的时候
    /// </summary>
    public class ActionInterceptor : IActionFilter
    {
        public void OnActionExecuting(ActionExecutingContext context)
        {
            ContextUtil.setValue(context.HttpContext);
        }

        public void OnActionExecuted(ActionExecutedContext context)
        {
            ContextUtil.setValue(context.HttpContext);
        }
    }
}